/** 
 *
 *  The basic data structure, all data class will be transfered by stream must inherit this class.
 *
 *  @author : huicong
 *  @date : 2008-10-26
 *
 */

#ifndef _BASIC_DATA_STRUCTURE_H
#define _BASIC_DATA_STRUCTURE_H

namespace bcmi_frame
{

    class BasicDataStructure
    {
    public:

        BasicDataStructure()
        {
        }

        virtual ~BasicDataStructure()
        {
        }

    public:

        /** Serialize function.
         *
         *  Serialize function. Write the class information in the _streamWriter and then 
         *  will be transfer to another process.
         *
         *  @param [INOUT] StreamWriter &_streamWriter : the class information writer.
         *  @return HRESULT : the handled result.
         *
         */
        virtual HRESULT serialize(INOUT StreamWriter &_streamWriter) = 0;

        /** DeSerialize function.
         *
         *  DeSerialize function. Read the class information from the _streamWriter which 
         *  get data stream from other process.
         *
         *  @param [INOUT] StreamReader &_streamReader : the class information reader.
         *  @return HRESULT : the handled result.
         *
         */
        virtual HRESULT deSerialize(INOUT StreamReader &_streamReader) = 0;

    };

};//namespace bcmi_frame

#endif //#ifndef _BASIC_DATA_STRUCTURE_H